<html>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<div style="text-align:center ">
<form onsubmit="doLogin();return false;">
<table border="0" cellpadding="3" cellspacing="3"
	style="padding-top:15px;margin:0 auto;">
	
	<tr>
		<td><label>email</label> :</td>
		<td><input id="email" name="email" type="text" size="20"></td>
	</tr>
	<tr>
		<td><label>口令</label> :</td>
		<td><input id="passwd" name="passwd" type="password" size="20"></td>
	</tr>
	<tr align="right">
		<td colspan="2"><input name="登录" type="submit" id="Login"
			value="登录">
			<input name="取消" type="button" id="Cancel"
			value="取消"
			onclick="javascript:TB_remove()"></td>
		<td><a href="regist.html">注册</a></td>
	</tr>
</table>
</form>
</div>
<script>
   function doLogin(){
    var xmlhttp = getHttpRequest();
	xmlhttp.open("get","login.ajax?email="+$$("email").value+"&passwd="+$$("passwd").value,false);
	xmlhttp.send("");
	var r=xmlhttp.responseText;
	if(r.toLowerCase()!="prefans"){
        $$("spanPreFans").style.display="none";
         $$("spanFans").style.display="inline";
         $$("welcomeBar").innerHTML=r+",欢迎来到Openfans"; 
         login=true;
         TB_remove();    
       }
       else{
            alert("密码错误,请重试!")            
       }
   }
</script>
</html>